This invention relates to scheduling of requests executed by an online system in general and in particular to scheduling of execution of queries in a database system.
Online systems receive requests from users and process them. For example, an online system that provides content, receives requests for content from users or from other applications. Similarly, a database system receives database queries for processing from sources, for example, users, applications, and so on. A source of queries is referred to as a consumer, since the source of requests consumes resources of the online system. Consumers may be associated with priorities. For example, certain users may have higher priority compared to other users, certain applications may have higher priority compared to other applications and so on. Consumers with higher priority typically get larger share of resources of the online system compared to consumers with lower priorities.
When the online system receives a request for processing, the online system does not have an accurate measure of the time required for processing the request. Therefore, while providing resources for executing a number of requests received from different consumers, the online system may allocate disproportionate amount of resources. Conventional techniques for scheduling requests often allocate disproportionate amount of resources to consumers thereby providing more resources to some consumers than they deserve and less resources to other consumers.